<template>
  <div>
    <el-menu 
      class="admin-menu" 
      :default-openeds="['1', '3']" 
      style="min-height: 100vh;overflow-x:hidden" 
      background-color="#001529" 
      text-color="#a6adb4" 
      active-text-color="#ffffff" 
      router>
      
      <div class="logo-container">
        <img :src="require('@/assets/images/juan.jpg')" alt="管理系统" class="logo-img">
        <h2 class="logo-text">种花吧后台管理系统</h2>
      </div>

      <el-menu-item index="/adminhome" class="menu-item">
        <i class="el-icon-s-home menu-icon"></i>
        <span>首页</span>
      </el-menu-item>

      <el-menu-item index="/adminhonor" class="menu-item">
        <i class="el-icon-trophy menu-icon"></i>
        <span>账单管理</span>
      </el-menu-item>

      <el-menu-item index="/adminuser" class="menu-item">
        <i class="el-icon-user menu-icon"></i>
        <span>用户管理</span>
      </el-menu-item>

      <el-menu-item index="/adminactivity" class="menu-item">
        <i class="el-icon-data-analysis menu-icon"></i>
        <span>活动管理</span>
      </el-menu-item>

      <!-- <el-menu-item index="/adminportal" class="menu-item">
        <i class="el-icon-s-home menu-icon"></i>
        <span>首页设定</span>
      </el-menu-item> -->

      <el-menu-item index="/adminseeds" class="menu-item">
        <i class="el-icon-s-management menu-icon"></i>
        <span>花种管理</span>
      </el-menu-item>

      <!-- <el-menu-item index="/admintools" class="menu-item">
        <i class="el-icon-suitcase menu-icon"></i>
        <span>工具管理</span>
      </el-menu-item> -->

      <el-menu-item index="/announcement" class="menu-item">
        <i class="el-icon-bell menu-icon"></i>
        <span>公告管理</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>
  
<script>
export default {
  name: "AdminAside",
}
</script>
  
<style scoped>
.admin-menu {
  padding-right: 0;
  border-right: none;
}

.logo-container {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  margin: 10px 0 20px;
  color: white;
  overflow: hidden;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  color: #ffffff;
}

.menu-item {
  line-height: 50px;
  margin: 4px 16px;
  border-radius: 6px;
  height: 50px;
  padding-left: 15px !important;
}

.menu-icon {
  margin-right: 10px;
  font-size: 18px;
  vertical-align: middle;
}

/* 悬停和激活状态 */
.menu-item:hover,
.menu-item.is-active {
  background-color: #1890ff !important;
  color: white !important;
  box-shadow: 0 0 8px rgba(24, 144, 255, 0.3);
}

/* 平滑过渡 */
.menu-item {
  transition: all 0.3s ease;
}

/* 自定义类用于覆盖Element UI的默认样式 */
:deep(.el-menu--collapse) .el-menu-item span,
:deep(.el-menu--collapse) .el-submenu__title span {
  height: 0;
  width: 0;
  overflow: hidden;
  visibility: hidden;
  display: inline-block;
}
</style>
  
  